# -*- coding: utf-8 -*-#
#-------------------------------------------------------------------------------
# 建立者:        Young  
# Name:         demo5.11
# Description:
# Author:       $赵怡蕾
# Date:         2019/2/14
#-------------------------------------------------------------------------------

list = ['a','b','c','d','e']
s = "+"
# 连接s和list，运行结果：a+b+c+d+e
print(s.join(list))
# 用逗号（，）运算符指定路径的每一部分
dirs = '','usr','local','nginx',''
# 使用join方法生成Linux格式的路径
linuxPath = '/'.join(dirs)
# 运行结果：/usr/local/nginx/
print(linuxPath)
# 使用join方法生成Windows格式的路径
windowPath = 'C:' + '\\'.join(dirs)
# 运行结果：C:\usr\local\nginx\
print(windowPath)

# numList = [1,2,3,4,5]
# 抛出异常
print(s.join(numList))